﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IPQC_ORDER_ITEM
// * CreateDate    : 2012/5/5 19:03:37
// * Creater       : CodeSmith
// * LastChangeDate: 2012/5/5 19:03:37
// * LastChanger   : 2012/5/5 19:03:37
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcIpqcOrderItemEntity : EntityBase
    {
        public QcIpqcOrderItemTable TableSchema
        {
            get
            {
                return QcIpqcOrderItemTable.Current;
            }
        }

        public QcIpqcOrderItemEntity()
        {

        }

        public QcIpqcOrderItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.NgDescription = Convert.ToString(CommonFunctions.ToObject(dr["NG_DESCRIPTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ApproveResult = Convert.ToInt32(CommonFunctions.ToObject(dr["APPROVE_RESULT"]));
        }

        public QcIpqcOrderItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ITEM_ID"]));
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.NgDescription = Convert.ToString(CommonFunctions.ToObject(dr["NG_DESCRIPTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ApproveResult = Convert.ToInt32(CommonFunctions.ToObject(dr["APPROVE_RESULT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIpqcOrderItemTable.Current;
            }
        }

        #region Perporty List
        public string OrderItemId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderItemTable.C_ORDER_ITEM_ID)); }
            set { SetData(QcIpqcOrderItemTable.C_ORDER_ITEM_ID, value); }
        }

        public string OrderId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderItemTable.C_ORDER_ID)); }
            set { SetData(QcIpqcOrderItemTable.C_ORDER_ID, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(QcIpqcOrderItemTable.C_QTY)); }
            set { SetData(QcIpqcOrderItemTable.C_QTY, value); }
        }

        public string NgDescription
        {
            get { return Convert.ToString(GetData(QcIpqcOrderItemTable.C_NG_DESCRIPTION)); }
            set { SetData(QcIpqcOrderItemTable.C_NG_DESCRIPTION, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(QcIpqcOrderItemTable.C_REMARK)); }
            set { SetData(QcIpqcOrderItemTable.C_REMARK, value); }
        }

        public int ApproveResult
        {
            get { return Convert.ToInt32(GetData(QcIpqcOrderItemTable.C_APPROVE_RESULT)); }
            set { SetData(QcIpqcOrderItemTable.C_APPROVE_RESULT, value); }
        }

        #endregion
    }


}

